<?php

/**
 * This is the model metadata class for table "order".
 */
class OrderMetadata extends CARMDC
{
	/**
	 * @return string the associated database table name
	 */
	public function tableName()
	{
		return 'order';
	}

	/**
	 * @return array validation rules for model attributes.
	 */
	public function rules()
	{
		// NOTE: you should only define rules for those attributes that
		// will receive user inputs.
		return array(
			array('total_price', 'numerical'),
			array('sn, object_type, status', 'length', 'max'=>50),
			array('pay_type', 'length', 'max'=>10),
			array('remark', 'length', 'max'=>255),
			array('worker_id', 'length', 'max'=>20),
			array('create_time, update_time', 'safe'),
			// The following rule is used by search().
			// Please remove those attributes that should not be searched.
			array('id, sn, object_type, status, pay_type, remark, create_time, update_time, worker_id, total_price', 'safe', 'on'=>'search'),
		);
	}

	/**
	 * @return array relational rules.
	 */
	public function relations()
	{
		// NOTE: you may need to adjust the relation name and the related
		// class name for the relations automatically generated below.
		return array(
		);
	}

	/**
	 * @return array customized attribute labels (name=>label)
	 */
	public function attributeLabels()
	{
		return array(
			'id' => 'ID',
			'sn' => 'Sn',
			'object_type' => 'Object Type',
			'status' => 'Status',
			'pay_type' => '支付类型',
			'remark' => 'Remark',
			'create_time' => 'Create Time',
			'update_time' => 'Update Time',
			'worker_id' => 'Worker',
			'total_price' => 'Total Price',
		);
	}
}